<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="expires" content="0">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta charset="utf-8"/>
    <link rel="shortcut icon" type="image/x-icon" href="../../../images/jsmile.ico"/>
    <title>字典管理</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_763780_tdovyxg8qq9.css">
    <link rel="stylesheet" href="../../../libs/vue/theme-chalk/elementui.css">
    <link rel="stylesheet" href="../../../css/index.css">
    <script src="../../../libs/vue/vue.js"></script>
    <script src="../../../libs/jquery/jquery.mini.js"></script>
    <script src="../../../libs/vue/elementui.js"></script>
    <script src="../../../libs/layer/layer.js"></script>
    <script src="../../../javascript/kit/jsmile.js"></script>
    <script src="../../../javascript/kit/vue-ext.js"></script>
</head>
<body>
<div id="app">
    <div>
        <el-breadcrumb separator="/" style="display: inline-block;">
            <el-breadcrumb-item><a href="#" @click="goHome()">首页</a></el-breadcrumb-item>
            <el-breadcrumb-item><a href="#">系统管理</a></el-breadcrumb-item>
            <el-breadcrumb-item>字典管理</el-breadcrumb-item>
        </el-breadcrumb>
    </div>

    <el-row>
        <el-col :span="4" style="margin-top:10px;">
            <el-input
                    placeholder="输入字典名称" v-model="dictName"></el-input>
            <el-tree  highlight-current check-on-click-node @node-click="handleNodeClick" ref="dictTree"
                     class="filter-tree" style="margin-top:20px;" :data="dictTree" :filter-node-method="filterName">
            </el-tree>
        </el-col>
        <el-col :span="20" >
            <el-card class="box-card"
                     style="margin-left:10px;margin-top: 10px;min-height:360px;max-height: 640px;" shadow="hover">
                              <span style="float:right;margin-bottom:10px;">
                                <el-button type="primary" @click="addDict">新增</el-button>
                             </span>
                <el-table :data="dictList" stripe border highlight-current-row  size="small"  style="width: 100%;margin-top:10px;" max-height="480">
                    <el-table-column   prop="dictValue" label="字典值" >
                    </el-table-column>
                    <el-table-column  prop="dictName" label="字典值名称" >
                    </el-table-column>
                    <el-table-column prop="visible" label="是否可见">
                        <template slot-scope="scope">
                            <el-tag type="success" v-if="scope.row.visible=='1'">是</el-tag>
                            <el-tag type="danger" v-if="scope.row.visible=='0'">否</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column
                            prop="init" label="是否系统预置">
                        <template slot-scope="scope">
                            <el-tag type="success" v-if="scope.row.init=='1'">是</el-tag>
                            <el-tag type="danger" v-if="scope.row.init=='0'">否</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column
                            prop="remark" label="备注"></el-table-column>
                    <el-table-column label="操作" width="150">
                        <template slot-scope="scope">
                            <el-button
                                    size="mini" type="success"
                                    @click="editDict(scope.$index, scope.row)">编辑</el-button>
                            <el-button
                                    size="mini"
                                    type="danger"
                                    @click="deleteDict(scope.$index, scope.row)">删除
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-card>
        </el-col>
    </el-row>


</div>
<script src="../../../javascript/sys/dict/dict.js"></script>
</body>
</html>